package com.jman.front.clients;

import com.jman.front.dto.Announcement;
import com.jman.front.dto.AnnouncementDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("announcementservice")
public interface AnnouncementClient {
    @GetMapping("/announcement/show")
    Announcement getById(@RequestParam Integer id);

    @GetMapping("/announcement/parts")
    List<AnnouncementDTO> getParts();

    @PostMapping("/announcement/saveInfo")
    Boolean saveInfo(@RequestBody Announcement announcement);

    @GetMapping("/announcement/getAll")
    List<Announcement> getAll();

    @DeleteMapping("/announcement/del")
    Boolean deleteById(@RequestParam Integer id);
}
